﻿using FastEndpoints;
using TodoList.Data;
using TodoList.Shared;

namespace TodoList.FastEndpoints.Features.Create;

internal sealed class Mapper : Mapper<Request, Response, TodoItem>
{
    public override TodoItem ToEntity(Request r) => new()
    {
        Title = r.Title,
        Description = r.Description,
        IsCompleted = r.IsCompleted,
        DueDate = r.DueDate
    };
}
